package com.sunny.tree.service.impl;

import com.sunny.tree.dao.TreeMapper;
import com.sunny.tree.model.Tree;
import com.sunny.tree.service.TreeService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * Created by tongchengke on 2016/8/17.
 */

@Service
public class TreeServiceImpl implements TreeService {

    @Resource
    private TreeMapper treeDao;

    @Override
    public int deleteByPrimaryKey(Long id) {
        return treeDao.deleteByPrimaryKey(id);
    }

    @Override
    public int insert(Tree record) {
        return treeDao.insert(record);
    }

    @Override
    public int insertSelective(Tree record) {
        return treeDao.insertSelective(record);
    }

    @Override
    public Tree selectByPrimaryKey(Long id) {
        return treeDao.selectByPrimaryKey(id);
    }

    @Override
    public int updateByPrimaryKeySelective(Tree record) {
        return treeDao.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKeyWithBLOBs(Tree record) {
        return treeDao.updateByPrimaryKeyWithBLOBs(record);
    }

    @Override
    public int updateByPrimaryKey(Tree record) {
        return treeDao.updateByPrimaryKey(record);
    }

    @Override
    public List<Tree> selectTreeByPid(Tree record) {
        return treeDao.selectTreeByPid(record);
    }
}
